package com.vitabuybuy.tv.ui.mine.talent.live.adapter

import androidx.recyclerview.widget.RecyclerView
import com.vitabuybuy.tv.R
import com.vitabuybuy.tv.databinding.ItemLiveReplayManageBinding
import com.vitabuybuy.tv.databinding.ItemPic2Binding
import com.vitabuybuy.tv.dto.PlayBackLiveListDto
import com.library.common.base.BindRecycAdapter

class LiveReplayManageListAdapter: BindRecycAdapter<ItemLiveReplayManageBinding, PlayBackLiveListDto>() {
    override fun onBindViewHolder(
        mBinding: ItemLiveReplayManageBinding,
        itemData: PlayBackLiveListDto,
        holder: RecyclerView.ViewHolder,
        position: Int
    ) {
        mBinding.itemData = itemData
        mBinding.tvDelete.setOnClickListener {onDeletePlayBackListener.invoke(position)  }
        mBinding.ivWhetherShowOnHome.setOnClickListener {  onIsShowHomePageBackListener.invoke(position)  }
    }

    override fun normalViewId(viewType: Int): Int {
        return R.layout.item_live_replay_manage
    }

    lateinit var onDeletePlayBackListener:(position:Int)->Unit
    lateinit var onIsShowHomePageBackListener:(position:Int)->Unit
}
